{{--关于我们专用模板--}}
@extends('theme.jishupucms.layouts.app')

{{-- head投放区域 --}}
@section('head-css-cast')
    @parent
@endsection
@section('head-js-cast')
    @parent
@endsection

{{-- seo --}}
@section('title', $meta['title'])
@section('keywords', $meta['keywords'])
@section('description', $meta['description'])

{{--body class--}}
@section('body-class', 'jsp-bg')

{{-- 核心内容 --}}
@section('content')
    @parent

    {{-- banner --}}
    <section class="jsp-banner-section">
        <?php
        use App\Services\AdsService;
        $ads = empty($ads) ? AdsService::getAdsBySpaceIdName('aboutus') : $ads;
        ?>
        <x-carousel id="carousel-{{$category->id}}" class="" :list="$ads"/>
    </section>

    {{-- 当前位置 --}}
    <x-breadcrumb :list="$breadcrumb" :class="empty($ads) || $ads->isEmpty() ?'jsp-navheight':''"/>

    {{-- 内容区域 --}}
    <section class="info-page jsp-content-section container">

        <div class="left">
            <div class="content">
                <h1 class="title">{{$category->infoPage->title??''}}</h1>
                <div class="content-center">
                    {!!$category->infoPage->content??''!!}
                </div>
            </div>
        </div>
        @php($topCate = getCategory(7))
        @if($topCate)
            <div class="right">
                <h3 class="mb-3 pb-3 block-title">{{$topCate['name']}}</h3>
                @php($topSubCate = getSubCategoryTree(7))
                @if($topSubCate)
                    <ul>
                        @foreach($topSubCate as $item)
                            <li class="{{$item['id']==$category['id']?'active':''}}">
                                <a {{$item['href_']}} {{$item['rel_']}}>{{$item['name']}}</a>
                            </li>
                        @endforeach
                    </ul>
                @endif
            </div>
        @endif
    </section>

@endsection

{{-- 底部投放区域 --}}
@section('footer-cast')
    @parent
@endsection

